<%@page import="helpers.UrlHelper"%>
<%@page import="models.Domain"%>
<%@page import="java.util.ArrayList"%>
<%@ page contentType="text/xml;charset=UTF-8" language="java"%>
<?xml version="1.0" encoding="UTF-8"?>
<% 
String serverUrl = UrlHelper.getServerUrl(request);
ArrayList<Domain> domains= (ArrayList<Domain> )request.getAttribute("domains");
%>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <url>
  <loc><%=serverUrl %>/</loc>
</url>
<%
for(Domain domain : domains)
{
%>
<url>
  <loc><%=serverUrl %>/s/<%=domain.getName()%></loc>
</url>

<%
}
%>

</urlset>